package com.ddzh.consumer.web;

import com.ddzh.UserFeignApi;
import com.ddzh.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jmx.export.annotation.ManagedOperationParameters;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("feign")
public class UserFeignController {

    @Autowired
    private UserFeignApi userFeignApi;

    @GetMapping("{id}")
    public User queryById(@PathVariable("id") String username){
        return userFeignApi.queryById(username);
    }
}
